package com.liuche.wiki.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 题目
 */
@ApiModel(description="题目")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "article")
public class Article implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 标题
     */
    @TableField(value = "title")
    @ApiModelProperty(value="标题")
    private String title;

    /**
     * 内容
     */
    @TableField(value = "content")
    @ApiModelProperty(value="内容")
    private String content;

    /**
     * 标签列表（json 数组）
     */
    @TableField(value = "tags")
    @ApiModelProperty(value="标签列表（json 数组）")
    private String tags;

    /**
     * 推荐答案
     */
    @TableField(value = "answer")
    @ApiModelProperty(value="推荐答案")
    private String answer;

    /**
     * 状态：0-待审核, 1-通过, 2-拒绝
     */
    @TableField(value = "review_status")
    @ApiModelProperty(value="状态：0-待审核, 1-通过, 2-拒绝")
    private Integer reviewStatus;

    /**
     * 审核信息
     */
    @TableField(value = "review_message")
    @ApiModelProperty(value="审核信息")
    private String reviewMessage;

    /**
     * 审核人 id
     */
    @TableField(value = "reviewer_id")
    @ApiModelProperty(value="审核人 id")
    private Long reviewerId;

    /**
     * 审核时间
     */
    @TableField(value = "review_time")
    @ApiModelProperty(value="审核时间")
    private Date reviewTime;

    /**
     * 浏览量
     */
    @TableField(value = "view_num")
    @ApiModelProperty(value="浏览量")
    private Integer viewNum;

    /**
     * 点赞数
     */
    @TableField(value = "thumb_num")
    @ApiModelProperty(value="点赞数")
    private Integer thumbNum;

    /**
     * 收藏数
     */
    @TableField(value = "favour_num")
    @ApiModelProperty(value="收藏数")
    private Integer favourNum;

    /**
     * 优先级
     */
    @TableField(value = "priority")
    @ApiModelProperty(value="优先级")
    private Integer priority;

    /**
     * 题目来源
     */
    @TableField(value = "`source`")
    @ApiModelProperty(value="题目来源")
    private String source;

    /**
     * 创建用户 id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value="创建用户 id")
    private Long userId;

    /**
     * 编辑时间
     */
    @TableField(value = "edit_time")
    @ApiModelProperty(value="编辑时间")
    private Date editTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value="创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    @ApiModelProperty(value="是否删除")
    private Byte isDelete;

    private static final long serialVersionUID = 1L;
}